package com.cosina.game.crystallight.ui.mapselect;

import com.cosina.game.crystallight.ui.ResourceManager;
import com.cosina.game.crystallight.ui.common.PaintSuite;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.view.View;
import android.widget.FrameLayout.LayoutParams;

public class ScorePart extends View {

	public ScorePart(Context context) {
		super(context);
		this.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, UpAndDownLayout.UP_HEIGHT));
		
		titleBitmap = ResourceManager.get("img/sctab/title.jpg");
		rowBitmap = ResourceManager.get("img/sctab/row.jpg");
		infoBitmap = ResourceManager.get("img/sctab/sct_footage.jpg");
		borderBitmap = ResourceManager.get("img/sctab/border.jpg");
	}
	
	Bitmap titleBitmap, borderBitmap, rowBitmap, infoBitmap;
	@Override
	protected void onDraw(Canvas canvas) {
		canvas.drawBitmap(borderBitmap, 0,0,PaintSuite.p4Simple);
		canvas.drawBitmap(borderBitmap, 320-6,0,PaintSuite.p4Simple);
		canvas.drawBitmap(titleBitmap, 6,0,PaintSuite.p4Simple);
		for(int i=0; i<10; i++){
			canvas.drawBitmap(rowBitmap, 6,38+ i*32,PaintSuite.p4Simple);
		}
		canvas.drawBitmap(infoBitmap, 6,38+ 10*32,PaintSuite.p4Simple);
	}
	
}
